// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class UserEx : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<UserEx, MasterDbContextLocator>
    {

        public int Id { get; set; }
        public string UserCode { get; set; }
        public string UserName { get; set; }
        public string UserPwd { get; set; }
        public string UserDesp { get; set; }
        public string UserAddr { get; set; }
        public string UserPhone { get; set; }
        public string RoleCode { get; set; }
        public string PrjCode { get; set; }
        public int? LoginCount { get; set; }
        public DateTime? LastLogindate { get; set; }
        public DateTime? CreateDate { get; set; }
        public string PhoneNum { get; set; }
        public string PersonClass { get; set; }
        public bool? Enabled { get; set; }
        public string CompanyCode { get; set; }
        public double? LastLongitude { get; set; }
        public double? LastLatitude { get; set; }
        public string VisibleArea { get; set; }
        public string VisibleCompanyType { get; set; }
        public bool? IsWarehouse { get; set; }
        public string WxOpenId { get; set; }
        public string WxHreadImg { get; set; }
        public string AreaCode { get; set; }
    
        public void Configure(EntityTypeBuilder<UserEx> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasNoKey();

                entityBuilder.ToView("UserEx");

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(50);

                entityBuilder.Property(e => e.CompanyCode).HasMaxLength(50);

                entityBuilder.Property(e => e.CreateDate).HasColumnType("datetime");

                entityBuilder.Property(e => e.LastLogindate).HasColumnType("datetime");

                entityBuilder.Property(e => e.PersonClass).HasMaxLength(50);

                entityBuilder.Property(e => e.PhoneNum).HasMaxLength(20);

                entityBuilder.Property(e => e.PrjCode).HasMaxLength(100);

                entityBuilder.Property(e => e.RoleCode).HasMaxLength(100);

                entityBuilder.Property(e => e.UserAddr).HasMaxLength(100);

                entityBuilder.Property(e => e.UserCode)
                    .IsRequired()
                    .HasMaxLength(100);

                entityBuilder.Property(e => e.UserDesp).HasMaxLength(100);

                entityBuilder.Property(e => e.UserName).HasMaxLength(20);

                entityBuilder.Property(e => e.UserPhone).HasMaxLength(20);

                entityBuilder.Property(e => e.UserPwd).HasMaxLength(50);

                entityBuilder.Property(e => e.WxHreadImg).HasMaxLength(200);

                entityBuilder.Property(e => e.WxOpenId).HasMaxLength(100);
        }

    }
}

